package org.dromara.business.domain.bo;

import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.business.domain.BusinessConfigType;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;

/**
 * 业务参数配置类型业务对象 business_config_type
 *
 * @author zj
 * @date 2024-06-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = BusinessConfigType.class, reverseConvertGenerate = false)
public class BusinessConfigTypeBo extends BaseEntity {

    /**
     * 配置主键
     */
    @NotNull(message = "配置主键不能为空", groups = {EditGroup.class})
    private Long configTypeId;

    /**
     * 配置名称
     */
    @NotBlank(message = "配置名称不能为空")
    @Size(min = 0, max = 100, message = "配置名称长度不能超过{max}个字符")
    private String configName;

    /**
     * 配置类型
     */
    @NotBlank(message = "配置类型不能为空")
    @Size(min = 0, max = 100, message = "配置类型长度不能超过{max}个字符")
    @Pattern(regexp = "^[a-z][a-z0-9_]*$", message = "配置类型必须以字母开头，且只能为（小写字母，数字，下滑线）")
    private String configType;

    /**
     * 备注
     */
    private String remark;


}
